package system

import (
	"goweb/web/api"

	"github.com/gofiber/fiber/v2"
)

// 登录认证
type AuthRouter struct {
}

// 初始化 Auth 路由
func (a *AuthRouter) InitAuthRouter(router fiber.Router) {
	authRouter := router.Group("auth")
	// 登录、token续期、退出
	var userApi = api.AppApi.SystemApi.User
	{
		authRouter.Post("login", userApi.Login)
		authRouter.Post("logout", userApi.Logout)
		authRouter.Put("refresh-token", userApi.RefreshToken)
	}
}
